using System.Collections.Generic;
using PropertyExpression.Common;

namespace PropertyExpression.ControllableQuery
{
    public class ColumnSelector
    {
        internal readonly List<IOption<string>> ColumnRefs = new List<IOption<string>>();

        public T _<T>()
        {
            ColumnRefs.Add(Option.Nothing<string>());
            return default(T);
        }

        public T _<T>(string columnRef)
        {
            ColumnRefs.Add(columnRef.AsOption());
            return default(T);
        }
    }

    public static class ColumnSelectorExtensions
    {
        public static string String(this ColumnSelector it)
        {
            return it._<string>();
        }

        public static int Int(this ColumnSelector it)
        {
            return it._<int>();
        }
    }
}